import {SearchList} from '@/API/index'
export default {
    namespaced:true,
    state:{
        Search_List:{},
    },
    actions:{
       async getlist({commit},getSerch){
            let GetSerch = await SearchList(getSerch);
            if (GetSerch.data.code==200) {
                commit("GETLIST",GetSerch.data.data)
                return 'OK'
            }
        },
    },
    mutations:{
        GETLIST(store,GetSerch){
            store.Search_List = GetSerch
        }
    },
    getters:{
        attrsList(store){
            return store.Search_List.attrsList 
        },
        goodsList(store){
            return store.Search_List.goodsList || []
        },
        trademarkList(store){
            return store.Search_List.trademarkList
        }
    }
}